import React from 'react';
import './App.scss';

import routes from './routes.js'
import {HashRouter,Route,Switch,Redirect} from 'react-router-dom'
import AppNav from './components/AppNav'
import Global from './components/Global'

function App() {
  return (
    <div>
      <Global>
        <HashRouter>
        <Switch>
          <Redirect from="/" to="/home" exact />
          {routes.map(e => <Route {...e} />)}
        </Switch>

        {/* 底部导航 */}
        <AppNav />
      </HashRouter>
    </Global>
  </div>
  );
}

export default App;
